Booting from non-volatile memory

ABSTRACT

A computer system includes a system memory (SM) and a non-volatile memory (NVM). The computer system is arranged to copy at least a part of the system state, stored in the system memory during a clean boot-up procedure, into the non-volatile memory ( 209, 329 ). During subsequent start-ups of the computer system, the system state is copied from the non-volatile memory into the system memory ( 205, 305 ), resulting in a significantly faster system start-up. In case the configuration of the computer system has changed, the complete boot-up procedure is executed again and the new system state is copied into the non-volatile memory, overwriting the previously stored system state.

TECHNICAL FIELD

The present invention relates to booting of a computer system.

BACKGROUND ART

Computer systems, such as personal computers often utilize aninitialization procedure during which a computer operating system isloaded. In general, the operating system for a computer system is storedon a non-volatile storage medium, such as a magnetic hard disk drive.However, the processor of the computer system executes instructions fromthe so-called system memory, which is an addressable memory such asDRAM. In order to initialize this addressable memory, a small amount ofnon-volatile boot-up memory is typically provided in a dedicated memory.The dedicated memory contains a program, the so-called basicinput/output (BIOS) program, used for reading some initial portion ofthe operating system from the hard disk drive and loading it into thesystem memory. This portion of the operating system is then responsiblefor loading and initializing remaining portions of the operating system.This process is generally referred to as “booting” the operating system.After a computer initializes itself or “boots”, it is usually in adefault state, ready for a user to initiate some program or process.Usually, the computer system is in the same state after everyinitialization, regardless of a user's past activities. The boot-upprocedure executed when the computer system is turned on is usuallyreferred to as a cold boot, whereas the boot-up procedure executed using{Ctrl}+{Alt}+{Delete} or similar is referred to as a warm boot. Theboot-up procedure is a time consuming process, as it typically requiresexecution of the boot sequence stored on the boot device, includingcopying operating system files to the system memory. As a result, theuser of a computer system has to wait quite some time after switching onthe apparatus before he can actually start using it.

DISCLOSURE OF INVENTION

It is an object of the invention to provide a computer system with animproved boot-up procedure, strongly reducing the time required forbooting up the computer system.

This object is achieved with a computer system comprising a systemmemory and a non-volatile memory, the non-volatile memory beingaccessible by the system memory. The computer system is arranged to copyat least a part of the system state, stored in the system memory duringa first boot-up procedure, into the non-volatile memory. When bootingthe computer system, a copy of the system state resulting from the firstboot-up procedure is stored in the non-volatile memory. This copy of thesystem state can be used the next time the computer system is switchedon to directly define the state obtained as a result of the boot-upprocedure. Execution of the boot sequence stored on the boot device isnot required as well as copying of operating system files to the systemmemory. Almost all processing during the boot-up procedure iseliminated, strongly reducing the time required for performing theboot-up procedure. Furthermore, the system state that is stored in thenon-volatile memory is a clean and well-defined system state having noerrors that can be introduced during use of the system after booting,for example.

U.S. Pat. No. 6,449,683B1 describes a computer system, including anon-volatile random-access memory coupled to a processor. Upon receivingor generating a command to enter a low-power mode, the processorallocates space in the memory for storing the operating states of systemdevices. Once the device states are stored to memory, the processor thenasserts a command signal that instructs the computer system to enter thelow-power mode. Upon detecting the restoration of power, the processorrestores the device states from the allocated space in memory and thenresumes normal operation.

U.S. Pat. No. 6,393,584B1 describes a computer system, including aprocessor and a hard disk drive. Upon receiving or generating a commandto enter a “sleep” mode, a sleep file is created within the hard diskdrive, which stores the operating state of the computer system. When theoperating state has been stored, power is removed from the computersystem. Upon start up, the operating system of the computer system isloaded and the operating state is restored from the sleep file on thehard disk drive. After restoration of the operating state, the computersystem is in the same state that it was in prior to invoking the sleepstate.

U.S. Pat. No. 6,098,158 discloses a computer system, including aprocessor, RAM storage and system memory. Any particular softwareapplication may initiate a so-called fast boot-up procedure. Whenexecuting the fast boot-up procedure, a boot image is saved in the RAMstorage. One or more boot images may be stored in association with aninitiating application. At a later moment in time, the boot image can beretrieved to system memory. Upon a given occurrence, such as a poweroutage or other system failure or interruption, the computer system isthen restored to a given execution state from the boot image.

However, none of these documents discloses the principle of saving atleast a part of a well-defined system state in a non-volatile memory,for enabling a fast cold boot of the computer system. U.S. Pat No.6,449,683B1 and U.S. Pat. No. 6,393,584B1 focus on restoring thecomplete system state when recovering from a low-power mode, whereasU.S. Pat. No. 6,098,158 focuses on restoring the full system state whenrecovering from an error i.e. rather a fast warm boot than a fast coldboot.

Further embodiments of the invention are described in the dependentclaims. According to the invention, a method for booting a computersystem is claimed as well.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram showing a computer system according to theinvention.

FIG. 2 is a flowchart showing general steps for booting a computersystem according to the invention.

FIG. 3 is a flowchart showing steps for booting a computer systemaccording to FIG. 1.

DESCRIPTION OF PREFERRED EMBODIMENTS

Referring to FIG. 1, a schematic block diagram illustrates a computersystem in the form of a personal computer (PC), comprising a centralprocessing unit CPU, a hard disk drive HDD, a system memory SM, anon-volatile memory NVM, a system bus SB, a video controller VC, adisplay device DD, a keyboard controller KC, a keyboard KB and aread-only memory ROM. The system bus SB is coupled to the centralprocessing unit CPU via coupling 1, to the hard disk drive HDD viacoupling 3, to the video controller VC via coupling 5, to the keyboardcontroller KC via coupling 7 and to the read-only memory ROM viacoupling 17. The central processing unit CPU is coupled to the systemmemory SM via coupling 9, and the system memory SM is coupled tonon-volatile memory NVM via coupling 15. The video controller VC iscoupled to the display device DD via coupling 11. The keyboardcontroller KC, the central processing unit CPU, the hard disk drive HDD,the read-only memory ROM and the video controller VC are coupled via thesystem bus SB. In an alternative embodiment, the non-volatile memory NVMis coupled directly to the system bus SB and communicates with thesystem memory SM via the central processing unit CPU. The computersystem is capable of executing a prerecorded list of instructions, suchas programs or program modules, which causes the computer system tobehave in a predetermined manner. Program modules may include routines,programs, objects, components, data structures, etc. that performparticular tasks or implement particular abstract data types.

In other embodiments, the computer system may comprise differentdevices, including a floppy disk drive, a printer, a mouse, a CD-ROMplayer, and a DVD player, for example.

When the computer system according to FIG. 1 is turned on, it needs tofind instructions immediately to tell the personal computer what to runin order to start up and these instructions it finds within theso-called Basic Input Output System (BIOS) program. The BIOS program isstored in read-only memory ROM, which is for example a FLASH memorybeing used as if it is a read-only memory. To run the BIOS program, theBIOS program is often loaded first from the read-only memory ROM intothe system memory SM, via the system bus SB. FIG. 2 is a flowchartshowing general steps for booting a computer system according to theinvention. Referring to FIG. 2, when the computer system is turned on anoperating system loader is initiated in step 201. In a next step 203, itis verified whether the configuration of the computer system haschanged. If the system configuration has changed, the normal boot-upprocedure is followed in step 207. In step 209, at least a part of thesystem state stored in the system memory SM during the boot-upprocedure, is copied from the system memory SM to the non-volatilememory NVM. In case the system configuration has not changed, a secondboot-up procedure is followed. In step 205 the system state stored inthe non-volatile memory NVM is copied to the system memory SM. Inparallel to step 205, some remaining initialization procedures may beexecuted, not shown in FIG. 2. The second boot-up procedure allows avery fast boot-up of the computer system in case the systemconfiguration has not changed, since this boot-up procedure comprises amemory-to-memory copy of the result of the normal boot-up procedure.Furthermore, the second boot-up procedure is both independent of theplatform and the operating system that is being used. It is also morestable and reliable than repeated hibernation, since the system stateobtained after a clean boot-up procedure is stored in the non-volatilememory NVM, whereas in case of hibernation it can not be ensured thatthe system state does not comprise any errors introduced during use ofthe computer system after booting up.

Preferably, the non-volatile memory NVM comprises a magnetic randomaccess memory (MRAM). MRAM allows a fast memory access, allowing thecentral processing unit CPU to retrieve the system state from thenon-volatile memory NVM at a high speed, resulting in an increase in theperformance of the computer system during the boot-up procedure.

In a preferred embodiment, the computer system according to theinvention comprises a boot update flag (BUF), which can be implementedas a dedicated register on the motherboard chipset. The BUF is set whenit is likely that the system state as stored in the non-volatile memoryNVM is not up-to-date, i.e. it does not reflect the currentconfiguration of the computer system. For example, in case the casing ofthe computer system is opened it is likely that the hardwareconfiguration has changed. The opening of the casing is detected by aphysical switch, and the BUF is set. Other examples are when theoperating system of the computer system has been updated, which isdetected by a dedicated driver that sets the BUF, or in case of a changein settings of the network where the computer system is connected to.Yet another example is that the BUF can be set manually by means of aseparate button on the computer system. Initially, i.e. the first time acomputer system is powered up, the BUF will be set. In an alternativeembodiment, a routine is implemented that verifies if changes in thesystem configuration have occurred. This routine may be combined withthe BUF. In that case the BUF is set, if the routine detects a change inthe system configuration. FIG. 3 is a flowchart showing a method forbooting a computer system according to FIG. 1. Referring to FIG. 3, whenthe power is switched on, in step 301 the BIOS program is initialized,after it has been loaded into the system memory SM. Initialization ofthe BIOS program may include running the power-on self test (POST) aswell as hardware initialization. A step 303, performed by the BIOSprogram, verifies whether the BUF is set. In case the BUF is set, anormal boot-up procedure is performed. In step 317 the boot device isinitialized, and for the computer system shown in FIG. 1 the hard diskdrive HDD is the boot device. The master boot record (MBR) is read fromthe hard disk drive HDD in step 319. A step 321 reads the activepartition of the master boot record. In a step 323 the file system ismounted. A step 325 reads the operating system (OS) loader from the bootdevice. In step 327 the operating system is loaded in the system memorySM. A copy of the system memory SM, i.e. a copy of the system state, ismade and stored in the non-volatile memory NVM in step 329. A step 331resets the value of the BUF. Step 307 shows that the computer system isready for use. In case the BUF is not set, a second boot-up procedure isfollowed. In step 305 the system state stored in the non-volatile memoryNMV is copied to the system memory SM. In parallel to step 305, the bootdevice in the form of the hard disk drive HDD is initialized in step309. The master boot record (MBR) is read from the hard disk drive HDDin step 311. A step 313 reads the active partition of the master bootrecord. In a step 315 the file system is mounted. After finishing steps305 and 315, the computer system is ready for use in step 307. In casethe computer system does not respond within a chosen time interval afterperforming step 305, an error may have occurred and the operating systemof the computer system will enforce a cold boot. The steps executedduring the normal boot-up procedure described in this embodiment aresteps that typically occur in a boot-up procedure. In other embodiments,however, different steps may be executed, depending on which devices arepresent in a computer system, the BIOS program and the manufacturer ofthe hardware, to name a few.

The system state that is copied to the non-volatile memory NVM in step329 is the state as stored in the system memory SM, and it is assumedthat all other volatile memory in the computer system, such as buffers,registers or caches not being part of the system memory SM, are emptyafter the normal boot-up procedure. If this is not the case, thesebuffers, registers or caches may have to be flushed, i.e. reset, notshown in FIG. 3, before copying the system state stored in system memorySM to the non-volatile memory NVM in step 329. In this way it is ensuredthat the content of non-volatile memory NVM after performing step 329,is a complete representation of the state of the computer system.

In the present embodiment, step 329 copies all system state stored insystem memory SM after completion of the boot-up procedure tonon-volatile memory NVM. In other embodiments, only a part of the systemstate is copied to non-volatile memory NVM by using a driver thatinitiates step 329 as soon as the amount of occupied memory in thesystem memory SM approximates the space reserved in non-volatile memorySM for storing of the system state. Alternatively, copying of a part ofthe system state to non-volatile memory NVM can be initiated by a userpressing a dedicated button, or at a well defined point in the boot-upprocedure, for example at the moment a user has to log-in. In case onlya part of the system state obtained until a certain point in the boot-upprocedure is stored in non-volatile memory NVM, after performing step305 the part of the boot-up procedure that has not been executed fromsaid point onwards still has to be executed.

In yet another embodiment the amount of system state that is saved inthe non-volatile memory NVM in step 329 is made dependent on the user,in case of a plurality of users working on the same computer system. Forexample, for the most frequent users a larger amount of system state issaved when compared to the less frequent users, allowing the first groupof users to have a relatively faster boot-up procedure.

In some embodiments a plurality of different system states is saved inthe non-volatile memory NVM, by repeating the steps 317-331 fordifferent types of operating systems or for several instances of anoperating system. As a result, the user may switch between two or moreoperating systems without the need of a cold boot of the computersystem.

In different embodiments the computer system may comprise other systemconfigurations, such as hand-held devices, multiprocessor systems,microprocessor-based or programmable consumer electronics, network PCs,minicomputers, mainframe computers and the like.

It should be noted that the above-mentioned embodiments illustraterather than limit the invention, and that those skilled in the art willbe able to design many alternative embodiments without departing fromthe scope of the appended claims. In the claims, any reference signsplaced between parentheses shall not be construed as limiting the claim.The word “comprising” does not exclude the presence of elements or stepsother than those listed in a claim. The word “a” or “an” preceding anelement does not exclude the presence of a plurality of such elements.In the device claim enumerating several means, several of these meanscan be embodied by one and the same item of hardware. The mere fact thatcertain measures are recited in mutually different dependent claims doesnot indicate that a combination of these measures cannot be used toadvantage.

1. A computer system comprising: a system memory (SM), a non-volatilememory (NVM), the non-volatile memory being accessible by the systemmemory, wherein the computer system is arranged to copy at least a partof the system state, stored in the system memory during a first boot-upprocedure, into the non-volatile memory (209, 329).
 2. A computer systemaccording to claim 1, wherein the computer system is further arranged tocopy the system state stored in the non-volatile memory into the systemmemory during a second boot-up procedure of the computer system (205,305).
 3. A computer system according to claim 2, wherein the computersystem is further arranged to execute either the first boot-up procedureor the second boot-up procedure, dependent on whether the configurationof the computer system has changed.
 4. A computer system according toclaim 3, wherein the computer system further comprises a dedicatedregister flag indicating whether the configuration of the computersystem has changed.
 5. A computer system according to claim 1,characterized in that the non-volatile memory comprises a magneticrandom access memory.
 6. A method for booting a computer system,comprising a first boot-up procedure, wherein the computer systemcomprises: a system memory (SM), a non-volatile memory (NVM), thenon-volatile memory being accessible by the system memory, and whereinthe first boot-up procedure comprises the steps: performing the bootsequence stored on the boot device (207), copying at least a part of asystem state, stored in the system memory during performance of the bootsequence, into the non-volatile memory (209, 329).
 7. A method forbooting a computer system according to claim 6, characterized in thatthe method further comprises a second boot-up procedure, wherein thesecond boot-up procedure comprises the step: copying the system statestored in the non-volatile memory into the system memory (205, 305).